﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.WMare
{
    [Table("MqttAcl")]
    public class MqttAcl
    {
        /// <summary>
        /// ID
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int id { get; set; }

        /// <summary>
        /// 0：禁用，1：允许
        /// </summary>
        public int allow { get; set; }

        /// <summary>
        /// IP
        /// </summary>
        public string ipaddr { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string username { get; set; }

        /// <summary>
        /// 客户端ID
        /// </summary>
        public string clientid { get; set; }

        /// <summary>
        /// 1：订阅，2：发布，3：订阅发布都可以
        /// </summary>
        public int access { get; set; }

        /// <summary>
        /// 主题
        /// </summary>
        public string topic { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime time_create { get; set; }
    }
}